#ifndef _BASE_H
#define _BASE_H

#include "reg.h"

#define YES 0
#define NO 1
#define MAYBE 2

class Base
{
	int index;
protected:
	char tmpbuffer[20];
public:
	virtual char* getMnemonic(){ return "ERROR";}
	Base(int _PC);
	int getIndex(){ return index;}
	static Base *initInstruction(char*);

	//for A2
	virtual bool isMem(){return false;}
	virtual void update(){}
	virtual int checkConflict(Base* lastMemInst){return MAYBE;}
	virtual void getReg(Reg &){}
	virtual int getOffset(){return 99999;}
};
#endif